package com.tnovoselec.android.feed.handler.entity;

public abstract class ValidEntity {

    private long id;

    public ValidEntity(long id) {
	super();
	this.id = id;
    }

    public ValidEntity() {
	super();
    }

    public long getId() {
	return id;
    }
    public void setId(long id){
	this.id = id;
    }

    public abstract boolean isValid();

    @Override
    public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + (int) (id ^ (id >>> 32));
	return result;
    }

    @Override
    public boolean equals(Object obj) {
	if (this == obj) {
	    return true;
	}
	if (obj == null) {
	    return false;
	}
	if (getClass() != obj.getClass()) {
	    return false;
	}
	ValidEntity other = (ValidEntity) obj;
	if (id != other.id) {
	    return false;
	}
	return true;
    }

}
